home *** CD-ROM | disk | FTP | other *** search
/ Aminet 34 / Aminet 34 (2000)(Schatztruhe)[!][Dec 1999].iso / Aminet / docs / help / adosguide.lha / ADOSguide / ADOS commands / Request Choice < prev    next >
Encoding:
Text File  |  1999-05-09  |  1.2 KB  |  55 lines

  1.                          --AMIGADOS GUIDE V2.6--
  2.                               REQUESTCHOICE
  3.  
  4.  
  5.    USE:
  6.    The RequestChoice command enables the user to send there own defined
  7.    alert requester to the screen.  This is used to gain information from 
  8.    the computer user.
  9.  
  10.    PATH:
  11.    C:
  12.  
  13.    SYSTEM:
  14.    3.0
  15.  
  16.    EXAMPLES:
  17.    1>REQUESTCHOICE >ENV:Answer "AmigaDOS 1" "Have you got 2?" "YES" "NO"
  18.    "CANCEL"
  19.  
  20.    NOTES:
  21.    The number of buttons you apply to the requester is only limited by the
  22.    width of the screen, but in general it is best to keep the requester as
  23.    short as possible.
  24.  
  25.    Below is a complete example of how the RequestChoice command would be
  26.    used within a script.
  27.  
  28.    
  29.    REQUESTCHOICE >ENV:Answer "AmigaDOS 1" "Have you got 2?" "YES" "NO"
  30.    "CANCEL"
  31.  
  32.      IF $Answer EQ "0" 
  33.  
  34.        echo "Not sure eh?"
  35.  
  36.      ENDIF
  37.  
  38.      IF $Answer EQ "1"
  39.  
  40.        echo "Version 2 is available now for download"
  41.      
  42.      ENDIF
  43.  
  44.      IF $Answer EQ "2"
  45.    
  46.       echo "Hope you are finding it useful."
  47.  
  48.      ENDIF
  49.  
  50.  
  51.    The buttons are numbered from 1 upwards from left to right, with the
  52.    exception of the extreme righthand button: this always returns 0 and
  53.    should be kept as a CANCEL gadget.
  54.                  
  55.